package com.xquant.marketdata.marketdata.service.impl;

import com.github.pagehelper.PageInfo;
import com.xquant.marketdata.marketdata.mapper.CompMapper;
import com.xquant.marketdata.marketdata.service.CompService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Auther: B946
 * @Date: 23/04/2020 11:26
 * @Description:
 */
@Service(CompService.BEAN_NAME)
public class CompServiceImpl implements CompService {

    @Autowired
    private CompMapper compMapper;

    @Override
    public PageInfo<Map> queryCompByPage(Map params) {
        List list = compMapper.queryCompByPage(params);
        return new PageInfo<>(list);
    }

    @Override
    public PageInfo<Map> queryCompByList(Map params) {
        List list = compMapper.queryCompByList(params);
        return new PageInfo<>(list);
    }

    @Override
    public PageInfo<Map> queryCompRatingByPage(Map params) {
        List list = compMapper.queryCompRatingByPage(params);
        return new PageInfo<>(list);
    }
    @Override
    public int queryCompRatingPre(Map map) {
        int ct = compMapper.queryCompRatingPre(map);
        return ct;
    }
    @Override
    public int queryCompRating(Map map) {
        int ct = compMapper.queryCompRating(map);
        return ct;
    }

    @Override
    public int updateCompRating(Map map) {
        return compMapper.updateCompRating(map);
    }

    @Override
    public int insertCompRating(Map map) {
        return compMapper.insertCompRating(map);
    }
    @Override
    public int deleteCompRating(Map map) {
        return compMapper.deleteCompRating(map);
    }
    @Override
    public int queryCompCountByCompName(Map map) {
        return compMapper.queryCompCountByCompName(map);
    }
    @Override
    public void saveComp(Map<String, Object> params){
        compMapper.saveComp(params);
    }
    @Override
    public void updateComp(Map<String, Object> params){
        compMapper.updateComp(params);
    }
    @Override
    public void deleteComp(Map<String, Object> params){
        compMapper.deleteComp(params);
    }




}
